import server from '../../public/server.js'
import api from '../../public/api.js'

Page({
  data() {
    infoList:[]
  },
  onLoad(){
    this.getInfo();
  },
  //获得笑话
  getInfo() {
    let url = api.apiObj.news.url;
    let dataObj = {
      key: api.apiObj.news.key,
      
    }
    server.GET(url,dataObj,this.showInfo)

  },
  showInfo(res){
    console.log(res.result.data[0]);
    
    this.setData({
      infoList:res.result.data
    })
  }
})